package com.review.prototype;



public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {

        //浅克隆
        Company company = new Company();
        company.setCompanyId(111);
        company.setCompanyName("华为");
        company.setCompanyType("民营");
        company.setCompanyAddress("江苏");
        company.setCompanyTelno(1234l);

        Object comClone = company.clone();  //克隆con

        System.out.println("原对象: " + company);
        System.out.println("克隆对象: " + comClone);



        //深克隆
        Job job = new Job();
        job.setJobId(22);
        job.setCompany(company);
        job.setJobName("java工程师");
        job.setJobMinSalary(4234f);
        job.setJobMaxSalary(54322f);
        job.setJobDegree("");
        job.setJobCity("苏州");

        Object jobClone = job.clone();

        System.out.println("原对象: " + job);
        System.out.println("克隆对象: " + jobClone);





    }
}
